#ifndef SPEECH_RECOG_JULIUS_RECOGNIZER_H_
#define SPEECH_RECOG_JULIUS_RECOGNIZER_H_


#include <string>
#include <exception>
#include <iostream>
#include <fstream>

#include <boost/noncopyable.hpp>

#include <julius/juliuslib.h>

class RecognizerException : public std::exception {
 public:
  explicit RecognizerException(std::string message);
  virtual ~RecognizerException() throw();
  virtual const char* what() const throw();
 private:
  std::string message_;
};

class Recognizer : private boost::noncopyable {
 public:
  explicit Recognizer(std::string const& conf_path);
  ~Recognizer();

  void Start();
  void Stop();
  void Log(const char* word);
 private:
  ::Recog* recog_;
  bool running_;
  std::ofstream stream_;
};

#endif/*SPEECH_RECOG_JULIUS_RECOGNIZER_H_*/

